package com.chalmers.foa.util;

import android.graphics.Bitmap;
import android.graphics.Matrix;


public class BitmapInitiator {
	public static void initiateBitmaps(Bitmap[] bitmaps, Bitmap orgBitmap) {
		Matrix scaleMatrix = new Matrix();
		int xScale = 1, yScale = 1;
		
		bitmaps[0] = Bitmap.createBitmap(orgBitmap);
		xScale = -1;
		yScale = 1;
		scaleMatrix.postScale(xScale, yScale); 
		bitmaps[1] = Bitmap.createBitmap(bitmaps[0], 0, 0, 
                orgBitmap.getWidth(), orgBitmap.getHeight(), scaleMatrix, true);
		xScale = -1;
		yScale = -1;
		scaleMatrix = new Matrix();
		scaleMatrix.postScale(xScale, yScale); 
		bitmaps[2] = Bitmap.createBitmap(bitmaps[0], 0, 0, 
				orgBitmap.getWidth(), orgBitmap.getHeight(), scaleMatrix, true);
		xScale = 1;
		yScale = -1;
		scaleMatrix = new Matrix();
		scaleMatrix.postScale(xScale, yScale); 
		bitmaps[3] = Bitmap.createBitmap(bitmaps[0], 0, 0, 
				orgBitmap.getWidth(), orgBitmap.getHeight(), scaleMatrix, true);
	}
}
